package com.redis.filter.redission;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RedissionConfig {
    @Value("${redisson.nodes}")
    private String clusterNodes;
    @Value("${redisson.password}")
    private String password;

    @Bean
    public RedissonClient initBloomFilter(){
        Config config = new Config();
        config.useSingleServer().setAddress(this.clusterNodes).setPassword(this.password);
        return Redisson.create(config);
    }
}